<template>
  <div>
    <!-- 键盘事件修饰符 -->
    <input type="text" @keydown.enter="fn">
    <br>
    <input type="text" @keydown.esc="f1">
    <!-- .tab .space .delete .up .down .left .right -->
  </div>
</template>

<script>
export default {
  methods:{
    fn(){
      console.log(111);
    },
    f1(){
      console.log(222);
    }
  }
}
</script>

<style>

</style>